package tools.language;

import javax.swing.JDialog;
import javax.swing.JOptionPane;


public class MentionAccounts {

	public static MentionAccounts instance;

	public static MentionAccounts getInstance() {
		if (instance == null) {
			instance = new MentionAccounts();
		}
		return instance;
	}

	public void errorRegistreren() {
		JOptionPane.showMessageDialog(null, "Niet alle velden zijn ingevoerd", "Error", 
				JOptionPane.OK_CANCEL_OPTION);
	}
	
	public void errorUsername() {
		JOptionPane.showMessageDialog(null, "Uw gebruikersnaam bestaat al", "Error", 
				JOptionPane.OK_CANCEL_OPTION);
	}
	
	public void succesRegistreren() {
		JOptionPane.showMessageDialog(null, "Uw account is opgeslagen", "Succes",
				JOptionPane.OK_CANCEL_OPTION);
	}
	
	public void errorEmail() {
		JOptionPane.showMessageDialog(null, "Uw e-mailadres is ongeldig", "Error",
				JOptionPane.OK_CANCEL_OPTION);
	}
	
	public void errorInloggen() {
		JOptionPane.showMessageDialog(null, "Uw gegevens komen niet overeen");
	}

	public void succesInloggen() {
		JOptionPane opt = new JOptionPane("U bent nu ingelogd", JOptionPane.INFORMATION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, new Object[]{}); // geen knoppen tonen
		final JDialog dlg = opt.createDialog("Inloggen..");

		//popup 1,5 seconden tonen
		new Thread(new Runnable()
		{
			public void run()
			{
				try
				{
					Thread.sleep(1500);
					dlg.dispose();

				}
				catch ( Throwable th )
				{

				}
			}
		}).start();
		dlg.setVisible(true);
	}

}
